#include "lib_f.h"
#include <iostream>

namespace LibF {
    static std::map<std::string, std::string> config_map;
    
    void init() {
        std::cout << "LibF: Initializing..." << std::endl;
        config_map.clear();
        config_map["version"] = "1.0.0";
        config_map["debug"] = "true";
    }
    
    void set_config(const std::string& key, const std::string& value) {
        std::cout << "LibF: Setting config [" << key << "] = " << value << std::endl;
        config_map[key] = value;
    }
    
    std::string get_config(const std::string& key) {
        auto it = config_map.find(key);
        if (it != config_map.end()) {
            std::cout << "LibF: Getting config [" << key << "] = " << it->second << std::endl;
            return it->second;
        }
        std::cout << "LibF: Config key [" << key << "] not found" << std::endl;
        return "";
    }
    
    void save_config() {
        std::cout << "LibF: Saving configuration (" << config_map.size() << " entries)" << std::endl;
        for (const auto& pair : config_map) {
            std::cout << "  " << pair.first << " = " << pair.second << std::endl;
        }
    }
}